A brainless search and replace to placate compilers that complain about
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Tue, 28 Feb 2006 17:27:50 +0000 (17:27 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Tue, 28 Feb 2006 17:27:50 +0000 (17:27 +0000)
well defined code that relies on the ISO C guarantee of unstated structure
initializers.

72 files changed:
gpsbabel/Makefile
gpsbabel/an1.c
gpsbabel/arcdist.c
gpsbabel/bcr.c
gpsbabel/brauniger_iq.c
gpsbabel/cetus.c
gpsbabel/compegps.c
gpsbabel/coto.c
gpsbabel/cst.c
gpsbabel/csv_util.c
gpsbabel/cvttypes.c
gpsbabel/defs.h
gpsbabel/delgpl.c
gpsbabel/discard.c
gpsbabel/duplicate.c
gpsbabel/easygps.c
gpsbabel/filter_skeleton.c
gpsbabel/format_skeleton.c
gpsbabel/garmin.c
gpsbabel/gdb.c
gpsbabel/geo.c
gpsbabel/geoniche.c
gpsbabel/glogbook.c
gpsbabel/gpilots.c
gpsbabel/gpspilot.c
gpsbabel/gpx.c
gpsbabel/gtm.c
gpsbabel/hiketech.c
gpsbabel/hsa_ndv.c
gpsbabel/html.c
gpsbabel/igc.c
gpsbabel/ignrando.c
gpsbabel/jeeps/gpsusbsend.c
gpsbabel/kml.c
gpsbabel/lowranceusr.c
gpsbabel/mag_pdb.c
gpsbabel/magproto.c
gpsbabel/mapsource.c
gpsbabel/msroute.c
gpsbabel/navicache.c
gpsbabel/netstumbler.c
gpsbabel/nmea.c
gpsbabel/nmn4.c
gpsbabel/nukedata.c
gpsbabel/overlay.c
gpsbabel/ozi.c
gpsbabel/palmdoc.c
gpsbabel/pathaway.c
gpsbabel/pcx.c
gpsbabel/polygon.c
gpsbabel/position.c
gpsbabel/psitrex.c
gpsbabel/quovadis.c
gpsbabel/reverse_route.c
gpsbabel/saroute.c
gpsbabel/shape.c
gpsbabel/smplrout.c
gpsbabel/sort.c
gpsbabel/stackfilter.c
gpsbabel/stmwpp.c
gpsbabel/tef_xml.c
gpsbabel/text.c
gpsbabel/tiger.c
gpsbabel/tomtom.c
gpsbabel/tpg.c
gpsbabel/tpo.c
gpsbabel/trackfilter.c
gpsbabel/unicsv.c
gpsbabel/vcf.c
gpsbabel/vitosmt.c
gpsbabel/xcsv.c
gpsbabel/yahoo.c

index 8c4a865e92bf1d7d4f480aa4de56063cf3c7da1e..e063534933cf50326cd3496ed26ae9d0676adf77 100644 (file)
@@ -30,7 +30,7 @@ OUTPUT_SWITCH=-o #
 #
 # Enable either or both of these as you wish.
 #
-OPTIMIZATION=-O $(EXTRA_OPTIMIZATION)
+OPTIMIZATION=-O -W $(EXTRA_OPTIMIZATION)
 DEBUGGING=-g $(EXTRA_DEBUGGING)
 # add -DDEBUG_MEM to turn on memory allocation logging
 CFLAGS=$(EXTRA_CFLAGS) $(DEBUGGING) -Icoldsync $(INHIBIT_EXPAT) $(INHIBIT_USB) $(OPTIMIZATION)
index 79613fcf48254d7e86778493f9fbe3472e76fbfb..17d3418c0bd7660d47908ec00ae292560136958e 100644 (file)
@@ -58,23 +58,23 @@ roadchange *roadchanges = NULL;
 static
 arglist_t an1_args[] = {
        {"type", &output_type, "Type of .an1 file (see README)", 
-               "", ARGTYPE_STRING },
+               "", ARGTYPE_STRING, ARG_NOMINMAX },
        {"road", &road_changes, "Road type changes (see README)",
-               "", ARGTYPE_HIDDEN | ARGTYPE_STRING },
+               "", ARGTYPE_HIDDEN | ARGTYPE_STRING, ARG_NOMINMAX },
        {"nogc", &nogc, "Do not add geocache data to description",
-               NULL, ARGTYPE_BOOL },
+               NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
        {"deficon", &opt_symbol, "Symbol to use for point data",
-               "Red Flag", ARGTYPE_STRING },
+               "Red Flag", ARGTYPE_STRING, ARG_NOMINMAX },
        {"color", &opt_color, "Color for lines or mapnotes",
-               "red", ARGTYPE_STRING },
+               "red", ARGTYPE_STRING, ARG_NOMINMAX },
        {"zoom", &opt_zoom, "Zoom level to reduce points",
-               NULL, ARGTYPE_INT },
+               NULL, ARGTYPE_INT, ARG_NOMINMAX },
        {"wpt_type", &opt_wpt_type, 
                "Waypoint type (marker,text,mapnote,circle)", 
-               "", ARGTYPE_STRING },
+               "", ARGTYPE_STRING, ARG_NOMINMAX },
        {"radius", &opt_radius, "Radius for circles", 
-               NULL, ARGTYPE_STRING },
-       {0, 0, 0, 0 }
+               NULL, ARGTYPE_STRING, ARG_NOMINMAX },
+       ARG_TERMINATOR
 };
 
 typedef struct guid {
index be5d1576b301bc455733a8dedf59b5d038b5c15e..d6b322a645505f72e19f38ab8c57f2a24143bbb7 100644 (file)
@@ -37,14 +37,14 @@ typedef struct {
 static
 arglist_t arcdist_args[] = {
        {"file", &arcfileopt,  "File containing vertices of arc", 
-               NULL, ARGTYPE_FILE | ARGTYPE_REQUIRED},
+               NULL, ARGTYPE_FILE | ARGTYPE_REQUIRED, ARG_NOMINMAX},
        {"distance", &distopt, "Maximum distance from arc", 
-               NULL, ARGTYPE_FLOAT | ARGTYPE_REQUIRED},
+               NULL, ARGTYPE_FLOAT | ARGTYPE_REQUIRED, ARG_NOMINMAX},
        {"exclude", &exclopt, "Exclude points close to the arc", NULL,
-               ARGTYPE_BOOL},
+               ARGTYPE_BOOL, ARG_NOMINMAX},
        {"points", &ptsopt, "Use distance from vertices not lines", 
-               NULL, ARGTYPE_BOOL},
-       {0, 0, 0, 0, 0}
+               NULL, ARGTYPE_BOOL, ARG_NOMINMAX},
+       ARG_TERMINATOR
 };
 
 #define BADVAL 999999
index 7fa43848641112157da5ef4370106577fb4a2987..3216f88f1e2d454f8161919fb111700b6a76ca04 100644 (file)
@@ -58,9 +58,9 @@ static char *radius_opt;
 static
 arglist_t bcr_args[] = {
        {"index", &rtenum_opt, "Index of route to write (if more the one in source)", NULL, ARGTYPE_INT, "1", NULL },
-       {"name", &rtename_opt, "New name for the route", NULL, ARGTYPE_STRING },
-       {"radius", &radius_opt, "Radius of our big earth (default 6371000 meters)", "6371000", ARGTYPE_FLOAT },
-       {0, 0, 0, 0, 0}
+       {"name", &rtename_opt, "New name for the route", NULL, ARGTYPE_STRING, ARG_NOMINMAX },
+       {"radius", &radius_opt, "Radius of our big earth (default 6371000 meters)", "6371000", ARGTYPE_FLOAT, ARG_NOMINMAX },
+       ARG_TERMINATOR
 };
 
 static void
index 42647bff7d9b7db96e8bbbc9c89219f86b640343..eed8cc93217b5a71d0bfbe50aaf7e77bcb17706d 100644 (file)
@@ -263,7 +263,7 @@ static void data_read(void)
 }
 
 static arglist_t brauniger_iq_args[] = {
-    {0, 0, 0, 0, 0}
+    ARG_TERMINATOR
 };
 
 ff_vecs_t brauniger_iq_vecs = {
index ca1bc49f8667e95760ed60b26c514e23d7ed354c..4f59cd16b9c56493355a572197eb7ac66d1722c7 100644 (file)
@@ -148,10 +148,11 @@ static char *appendicon = NULL;
 
 static
 arglist_t cetus_args[] = {
-       {"dbname", &dbname, "Database name", NULL, ARGTYPE_STRING },
+       {"dbname", &dbname, "Database name", NULL, ARGTYPE_STRING, 
+               ARG_NOMINMAX },
        {"appendicon", &appendicon, "Append icon_descr to description",
-               NULL, ARGTYPE_BOOL },
-       {0, 0, 0, 0 }
+               NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
+       ARG_TERMINATOR
 };
 
 static waypoint *
index ed0cf7c574419875a3ad86c58bf93d74e0883b53..64df78cc611a9f59504012f3ca65519ad7c6257e 100644 (file)
@@ -89,14 +89,14 @@ static char *option_snlen;
 static
 arglist_t compegps_args[] = {
        {"deficon", &option_icon, "Default icon name", 
-               NULL, ARGTYPE_STRING},
+               NULL, ARGTYPE_STRING, ARG_NOMINMAX },
        {"index", &option_index, "Index of route/track to write (if more the one in source)", 
                NULL, ARGTYPE_INT, "1", NULL},
        {"radius", &option_radius, "Give points (waypoints/route points) a default radius (proximity)", 
                NULL, ARGTYPE_FLOAT, "0", NULL},
        {"snlen", &option_snlen, "Length of generated shortnames (default 16)", 
                "16", ARGTYPE_INT, "1", NULL},
-       {0, 0, 0, 0, 0}
+       ARG_TERMINATOR
 };
 
 /* specialized readers */
index 76ac95b47746556c1514f461bb83f3c7d9e8f148..be07e701dc6c9bfb266cda6489f3a2f5c9fde90b 100644 (file)
@@ -102,9 +102,11 @@ static char *internals = NULL;
 
 static
 arglist_t coto_args[] = {
-       {"zerocat", &zerocat, "Name of the 'unassigned' category", NULL, ARGTYPE_STRING },
-       {"internals", &internals, "Export some internal stuff to notes", NULL, ARGTYPE_STRING | ARGTYPE_HIDDEN },
-       {0, 0, 0, 0, 0 }
+       {"zerocat", &zerocat, "Name of the 'unassigned' category", NULL, 
+               ARGTYPE_STRING, ARG_NOMINMAX },
+       {"internals", &internals, "Export some internal stuff to notes", NULL, 
+               ARGTYPE_STRING | ARGTYPE_HIDDEN, ARG_NOMINMAX },
+       ARG_TERMINATOR
 };
 
 static void
index 5026a3bca7e2466e9b1121c2ebc5b8e2e6835436..9c815e92d9767e78a54a178c87e844c0e441f14d 100644 (file)
@@ -47,7 +47,7 @@ static route_head *temp_route;
 
 static
 arglist_t cst_args[] = {
-       {0, 0, 0, 0, 0}
+       ARG_TERMINATOR
 };
 
 /* helpers */
index 877851ad1304419368abc981270b884837376f38..8e56442a16296dcca98794e7657587da32edb927 100644 (file)
@@ -648,7 +648,9 @@ static
 time_t
 sscanftime( const char *s, const char *format, const int gmt )
 {
-       struct tm stm = {0,0,0,0,0,0,0,0,0};
+       struct tm stm;
+       memset(&stm, 0, sizeof(stm));
+
        if ( strptime( s, format, &stm ) )
        {
                stm.tm_isdst = -1;
index a61cec634953b436f9f272d9891e7a6a4fdaed87..c39780b6fac379c69976f62e054d129ef49a57ed 100644 (file)
@@ -32,8 +32,8 @@ time_t tmstart;
 static
 arglist_t cvttype_skeleton_args[] = {
        {"action", &action, "Type of conversion to perform", "wpttotrk", 
-               ARGTYPE_STRING} , 
-       {0, 0, 0, 0, 0}
+               ARGTYPE_STRING, ARG_NOMINMAX} , 
+       ARG_TERMINATOR
 };
 
 
index 0cce2d9828283c36978ab47412110a34e6b99049..9db7ba3e168f0d49c78b542a9132e772697b65bf 100644 (file)
@@ -478,6 +478,9 @@ void        vmem_realloc(vmem_t*, size_t);
 #define ARGTYPE_TYPEMASK 0x00000fff
 #define ARGTYPE_FLAGMASK 0xfffff000
 
+#define ARG_NOMINMAX NULL, NULL
+#define ARG_TERMINATOR {0, 0, 0, 0, 0, ARG_NOMINMAX}
+
 typedef struct arglist {
        char *argstring;
        char **argval;
index 24d90b5c8f2f0015e5df8c2e672ea44750fcb5fd..66097eb6098aa4b3f9c4084ad6bd2802a3973f47 100644 (file)
@@ -97,7 +97,9 @@ gpl_trackpt(const waypoint *wpt)
 {
        double alt_feet = wpt->altitude / .3048;
        int status = 3;
-       gpl_point_t gp = {0};
+       gpl_point_t gp;
+       
+       memset(&gp, 0, sizeof(gp));
        le_write32(&gp.status, status);
        le_read64(&gp.lat, &wpt->latitude);
        le_read64(&gp.lon, &wpt->longitude);
index 0973313baae232d5b7859744d0bb8a679caf51e6..045c12112d880c46bc2723c1416a64b226442775 100644 (file)
@@ -31,12 +31,12 @@ static double vdopf;
 static
 arglist_t fix_args[] = {
        {"hdop", &hdopopt, "Suppress waypoints with higher hdop",
-               "-1.0", ARGTYPE_BEGIN_REQ | ARGTYPE_FLOAT},
+               "-1.0", ARGTYPE_BEGIN_REQ | ARGTYPE_FLOAT, ARG_NOMINMAX},
        {"vdop", &vdopopt, "Suppress waypoints with higher vdop",
-               "-1.0", ARGTYPE_END_REQ | ARGTYPE_FLOAT},
+               "-1.0", ARGTYPE_END_REQ | ARGTYPE_FLOAT, ARG_NOMINMAX},
        {"hdopandvdop", &andopt, "Link hdop and vdop supression with AND",
-               NULL, ARGTYPE_BOOL},
-       {0, 0, 0, 0, 0}
+               NULL, ARGTYPE_BOOL, ARG_NOMINMAX},
+       ARG_TERMINATOR
 };
 
 /*
index 31372ec6e4c58f1b68ca32e1ccb4d2fff7deaec6..bc5da9107c4f26c303dffd7c5e453b1af68e79ab 100644 (file)
@@ -30,14 +30,14 @@ static char *correct_coords = NULL;
 static
 arglist_t dup_args[] = {
        {"shortname", &snopt, "Suppress duplicate waypoints based on name",
-               NULL, ARGTYPE_BEGIN_REQ | ARGTYPE_BOOL},
+               NULL, ARGTYPE_BEGIN_REQ | ARGTYPE_BOOL, ARG_NOMINMAX},
        {"location", &lcopt, "Suppress duplicate waypoint based on coords",
-               NULL, ARGTYPE_END_REQ | ARGTYPE_BOOL},
+               NULL, ARGTYPE_END_REQ | ARGTYPE_BOOL, ARG_NOMINMAX},
        {"all", &purge_duplicates, "Suppress all instances of duplicates",
-               NULL, ARGTYPE_BOOL},
+               NULL, ARGTYPE_BOOL, ARG_NOMINMAX},
        {"correct", &correct_coords, "Use coords from duplicate points", 
-               NULL, ARGTYPE_BOOL},
-       {0, 0, 0, 0, 0}
+               NULL, ARGTYPE_BOOL, ARG_NOMINMAX},
+       ARG_TERMINATOR
 };
 
 
index 8945210c03322ae31f2bee6ce43d55c64377bf98..facfaf7c15b0d16f9ccbd405b4e586d0180db677 100644 (file)
@@ -33,7 +33,7 @@ static
 arglist_t easygps_args[] = {
 /*     {"deficon", &deficon, "Default icon name", "Waypoint", 
        ARGTYPE_STRING}, */
-       {0, 0, 0, 0 }
+       ARG_TERMINATOR
 };
 
 static void
index ac4f0d83671f21ba2a1bd9bc396a15a74a2e5704..14bb2b02cfc58954a87b9389315c8c5fdcbd91a9 100644 (file)
@@ -38,8 +38,8 @@
 static
 arglist_t filter_skeleton_args[] = {
 // {"foo", &fooopt, "The text of the foo option in help", 
-//   "default", ARGYTPE_STRING} , 
-       {0, 0, 0, 0, 0}
+//   "default", ARGYTPE_STRING, ARG_NOMINMAX} , 
+       ARG_TERMINATOR
 };
 
 /*******************************************************************************
index 584a30eee93cfab5474a0abbe524cdde0ef72057..64485cb19b11f29bf3a5216200c51d499a71223a 100644 (file)
@@ -49,8 +49,8 @@
 static
 arglist_t format_skeleton_args[] = {
 // {"foo", &fooopt, "The text of the foo option in help", 
-//   "default", ARGYTPE_STRING} , 
-       {0, 0, 0, 0, 0}
+//   "default", ARGYTPE_STRING, ARG_NOMINMAX} , 
+       ARG_TERMINATOR
 };
 
 /*******************************************************************************
index a0c4be9d9c99e3a04b604dd35eb098b64967e081..ad5cb80c6dd3d302834ae348a034d53968d2e0d7 100644 (file)
@@ -45,13 +45,13 @@ arglist_t garmin_args[] = {
        { "snlen", &snlen, "Length of generated shortnames", NULL, 
                ARGTYPE_INT, "1", NULL },
        { "snwhite", &snwhiteopt, "Allow whitespace synth. shortnames",
-               NULL, ARGTYPE_BOOL},
-       { "deficon", &deficon, "Default icon name", NULL, ARGTYPE_STRING },
+               NULL, ARGTYPE_BOOL, ARG_NOMINMAX},
+       { "deficon", &deficon, "Default icon name", NULL, ARGTYPE_STRING, ARG_NOMINMAX },
        { "get_posn", &getposn, "Return current position as a waypoint", 
-               NULL, ARGTYPE_BOOL},
+               NULL, ARGTYPE_BOOL, ARG_NOMINMAX},
        { "power_off", &poweroff, "Command unit to power itself down", 
-               NULL, ARGTYPE_BOOL},
-       { 0, 0, 0, 0, 0}
+               NULL, ARGTYPE_BOOL, ARG_NOMINMAX},
+       ARG_TERMINATOR
 };
 
 static const char * d103_symbol_from_icon_number(unsigned int n);
index ccc45d04c99ecbcd5511c525f827a6060901454f..3f98f134011f04bb8c7ca40fd852dc23072d6683 100644 (file)
@@ -116,8 +116,8 @@ static arglist_t gdb_args[] = {
        {GDB_OPT_VER, &gdb_opt_ver, 
            "Version of gdb file to generate (1,2)", "2", ARGTYPE_INT, "1", "2"},
        {GDB_OPT_VIA, &gdb_opt_via, 
-           "Drop route points that do not have an equivalent waypoint (hidden points)", NULL, ARGTYPE_BOOL},
-       {0, 0, 0, 0, 0}
+           "Drop route points that do not have an equivalent waypoint (hidden points)", NULL, ARGTYPE_BOOL, ARG_NOMINMAX},
+       ARG_TERMINATOR
 };
 
 /********************************************************************************************************/
index 5dadf400054b62cfbd58656a332cd4df083bcd30..a92c71547297f41e056be74c8a9011241b425e23 100644 (file)
@@ -29,9 +29,9 @@ static FILE *ofd;
 
 static
 arglist_t geo_args[] = {
-       {"deficon", &deficon, "Default icon name", NULL, ARGTYPE_STRING },
-       {"nuke_placer", &nuke_placer, "Omit Placer name", NULL, ARGTYPE_BOOL },
-       {0, 0, 0, 0, 0}
+       {"deficon", &deficon, "Default icon name", NULL, ARGTYPE_STRING, ARG_NOMINMAX },
+       {"nuke_placer", &nuke_placer, "Omit Placer name", NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
+       ARG_TERMINATOR
 };
 
 #define MYNAME "geo"
index d415b066521e81bb70c486aa2db2326777842531..621221c8059586a1488cb662306e4ea955d4e9b0 100644 (file)
@@ -48,10 +48,10 @@ static char *Arg_category = NULL;
 static
 arglist_t Args[] = {
        {"dbname", &Arg_dbname,
-           "Database name (filename)", NULL, ARGTYPE_STRING },
+           "Database name (filename)", NULL, ARGTYPE_STRING, ARG_NOMINMAX },
        {"category", &Arg_category,
-           "Category name (Cache)", NULL, ARGTYPE_STRING },
-       {0, 0, 0, 0, 0 }
+           "Category name (Cache)", NULL, ARGTYPE_STRING, ARG_NOMINMAX },
+       ARG_TERMINATOR
 };
 
 #define        ARG_FREE(X) do { if (X) { xfree(X); X = NULL; } } while (0)
@@ -215,7 +215,9 @@ geoniche_read_asc(const struct pdb *pdb)
        int             icon;
        char            *notes;
        char            gid[6+1];
-       struct tm       tm  = {0};
+       struct tm       tm;
+       
+       memset(&tm, 0, sizeof(tm));
 
        wpt = waypt_new();
        if (!wpt)
index 3711bcd7666dc89677cd210be49a7d41d0d26c8a..2212c8bc4a22aada3ec34e3fad97ea8d8b781763 100644 (file)
@@ -31,7 +31,7 @@ static route_head *trk_head;
 
 static
 arglist_t glogbook_args[] = {
-       {0, 0, 0, 0, 0}
+       ARG_TERMINATOR
 };
 
 /* Tracks */
index 4b1abe6d251d7f830b4cff639a6f8d2bd73ccc75..e4ee0e2a0ee5239691d52892fea3f923c718e7ba 100644 (file)
@@ -160,8 +160,8 @@ static char *dbname = NULL;
 
 static
 arglist_t my_args[] = {
-       {"dbname", &dbname, "Database name", NULL, ARGTYPE_STRING},
-       {0, 0, 0, 0, 0}
+       {"dbname", &dbname, "Database name", NULL, ARGTYPE_STRING, ARG_NOMINMAX},
+       ARG_TERMINATOR
 };
 
 static void
index 0ab9f1a5da122c0eaadd86e9d9deb1b9209a7ad3..8a5de41a1611a6d79a255daddf48a35802822612 100644 (file)
@@ -54,8 +54,8 @@ static char *dbname = NULL;
 
 static
 arglist_t gpspilot_args[] = {
-        {"dbname", &dbname, "Database name", NULL, ARGTYPE_STRING},
-        {0, 0, 0, 0, 0}
+        {"dbname", &dbname, "Database name", NULL, ARGTYPE_STRING, ARG_NOMINMAX},
+        ARG_TERMINATOR
 };
 
 static void
index 887705dce562c669e2c464ba3019a09317647941..b1104bfca5cc5ffd71e95b6068f31b64349878a9 100644 (file)
@@ -245,89 +245,89 @@ typedef struct tag_mapping {
  */
 
 tag_mapping tag_path_map[] = {
-       { tt_gpx, 0, "/gpx" },
-       { tt_name, 0, "/gpx/name" },
-       { tt_desc, 0, "/gpx/desc" },
-       { tt_author, 0, "/gpx/author" },
-       { tt_email, 0, "/gpx/email" },
-       { tt_url, 0, "/gpx/url" },
-       { tt_urlname, 0, "/gpx/urlname" },
-       { tt_keywords, 0, "/gpx/keywords" },
-
-       { tt_wpt, 0, "/gpx/wpt" },
-       { tt_wpt_ele, 0, "/gpx/wpt/ele" },
-       { tt_wpt_time, 0, "/gpx/wpt/time" },
-       { tt_wpt_name, 0, "/gpx/wpt/name" },
-       { tt_wpt_cmt, 0, "/gpx/wpt/cmt" },
-       { tt_wpt_desc, 0, "/gpx/wpt/desc" },
-       { tt_wpt_url, 0, "/gpx/wpt/url" },
-       { tt_wpt_urlname, 0, "/gpx/wpt/urlname" },
-       { tt_wpt_link, 0, "/gpx/wpt/link" },                    /* GPX 1.1 */
-       { tt_wpt_link_text, 0, "/gpx/wpt/link/text" },          /* GPX 1.1 */
-       { tt_wpt_sym, 0, "/gpx/wpt/sym" },
-       { tt_wpt_type, 1, "/gpx/wpt/type" },
-       { tt_cache, 1, "/gpx/wpt/groundspeak:cache" },
-       { tt_cache_name, 1, "/gpx/wpt/groundspeak:cache/groundspeak:name" },
-       { tt_cache_container, 1, "/gpx/wpt/groundspeak:cache/groundspeak:container" },
-       { tt_cache_type, 1, "/gpx/wpt/groundspeak:cache/groundspeak:type" },
-       { tt_cache_difficulty, 1, "/gpx/wpt/groundspeak:cache/groundspeak:difficulty" },
-       { tt_cache_terrain, 1, "/gpx/wpt/groundspeak:cache/groundspeak:terrain" },
-       { tt_cache_hint, 1, "/gpx/wpt/groundspeak:cache/groundspeak:encoded_hints" },
-       { tt_cache_desc_short, 1, "/gpx/wpt/groundspeak:cache/groundspeak:short_description" },
-       { tt_cache_desc_long, 1, "/gpx/wpt/groundspeak:cache/groundspeak:long_description" },
-       { tt_cache_log_wpt, 1, "/gpx/wpt/groundspeak:cache/groundspeak:logs/groundspeak:log/groundspeak:log_wpt" },
-       { tt_cache_log_type, 1, "/gpx/wpt/groundspeak:cache/groundspeak:logs/groundspeak:log/groundspeak:type" },
-       { tt_cache_log_date, 1, "/gpx/wpt/groundspeak:cache/groundspeak:logs/groundspeak:log/groundspeak:date" },
-       { tt_cache_placer, 1, "/gpx/wpt/groundspeak:cache/groundspeak:owner" },
-
-       { tt_rte, 0, "/gpx/rte" },
-       { tt_rte_name, 0, "/gpx/rte/name" },
-       { tt_rte_desc, 0, "/gpx/rte/desc" },
-       { tt_rte_number, 0, "/gpx/rte/number" },
-       { tt_rte_rtept, 0, "/gpx/rte/rtept" },
-       { tt_rte_rtept_ele, 0, "/gpx/rte/rtept/ele" },
-       { tt_rte_rtept_time, 0, "/gpx/rte/rtept/time" },
-       { tt_rte_rtept_name, 0, "/gpx/rte/rtept/name" },
-       { tt_rte_rtept_cmt, 0, "/gpx/rte/rtept/cmt" },
-       { tt_rte_rtept_desc, 0, "/gpx/rte/rtept/desc" },
-       { tt_rte_rtept_url, 0, "/gpx/rte/rtept/url" },
-       { tt_rte_rtept_urlname, 0, "/gpx/rte/rtept/urlname" },
-       { tt_rte_rtept_sym, 0, "/gpx/rte/rtept/sym" },
-
-       { tt_trk, 0, "/gpx/trk" },
-       { tt_trk_name, 0, "/gpx/trk/name" },
-       { tt_trk_desc, 0, "/gpx/trk/desc" },
-       { tt_trk_trkseg, 0, "/gpx/trk/trkseg" },
-       { tt_trk_number, 0, "/gpx/trk/number" },
-       { tt_trk_trkseg_trkpt, 0, "/gpx/trk/trkseg/trkpt" },
-       { tt_trk_trkseg_trkpt_ele, 0, "/gpx/trk/trkseg/trkpt/ele" },
-       { tt_trk_trkseg_trkpt_time, 0, "/gpx/trk/trkseg/trkpt/time" },
-       { tt_trk_trkseg_trkpt_name, 0, "/gpx/trk/trkseg/trkpt/name" },
-       { tt_trk_trkseg_trkpt_cmt, 0, "/gpx/trk/trkseg/trkpt/cmt" },
-       { tt_trk_trkseg_trkpt_desc, 0, "/gpx/trk/trkseg/trkpt/desc" },
-       { tt_trk_trkseg_trkpt_url, 0, "/gpx/trk/trkseg/trkpt/url" },
-       { tt_trk_trkseg_trkpt_urlname, 0, "/gpx/trk/trkseg/trkpt/urlname" },
-       { tt_trk_trkseg_trkpt_sym, 0, "/gpx/trk/trkseg/trkpt/sym" },
-       { tt_trk_trkseg_trkpt_course, 0, "/gpx/trk/trkseg/trkpt/course" },
-       { tt_trk_trkseg_trkpt_speed, 0, "/gpx/trk/trkseg/trkpt/speed" },
+       { tt_gpx, 0, "/gpx", 0UL },
+       { tt_name, 0, "/gpx/name", 0UL },
+       { tt_desc, 0, "/gpx/desc", 0UL },
+       { tt_author, 0, "/gpx/author", 0UL },
+       { tt_email, 0, "/gpx/email", 0UL },
+       { tt_url, 0, "/gpx/url", 0UL },
+       { tt_urlname, 0, "/gpx/urlname", 0UL },
+       { tt_keywords, 0, "/gpx/keywords", 0UL },
+
+       { tt_wpt, 0, "/gpx/wpt", 0UL },
+       { tt_wpt_ele, 0, "/gpx/wpt/ele", 0UL },
+       { tt_wpt_time, 0, "/gpx/wpt/time", 0UL },
+       { tt_wpt_name, 0, "/gpx/wpt/name", 0UL },
+       { tt_wpt_cmt, 0, "/gpx/wpt/cmt", 0UL },
+       { tt_wpt_desc, 0, "/gpx/wpt/desc", 0UL },
+       { tt_wpt_url, 0, "/gpx/wpt/url", 0UL },
+       { tt_wpt_urlname, 0, "/gpx/wpt/urlname", 0UL },
+       { tt_wpt_link, 0, "/gpx/wpt/link", 0UL },                       /* GPX 1.1 */
+       { tt_wpt_link_text, 0, "/gpx/wpt/link/text", 0UL },             /* GPX 1.1 */
+       { tt_wpt_sym, 0, "/gpx/wpt/sym", 0UL },
+       { tt_wpt_type, 1, "/gpx/wpt/type", 0UL },
+       { tt_cache, 1, "/gpx/wpt/groundspeak:cache", 0UL },
+       { tt_cache_name, 1, "/gpx/wpt/groundspeak:cache/groundspeak:name", 0UL },
+       { tt_cache_container, 1, "/gpx/wpt/groundspeak:cache/groundspeak:container", 0UL },
+       { tt_cache_type, 1, "/gpx/wpt/groundspeak:cache/groundspeak:type", 0UL },
+       { tt_cache_difficulty, 1, "/gpx/wpt/groundspeak:cache/groundspeak:difficulty", 0UL },
+       { tt_cache_terrain, 1, "/gpx/wpt/groundspeak:cache/groundspeak:terrain", 0UL },
+       { tt_cache_hint, 1, "/gpx/wpt/groundspeak:cache/groundspeak:encoded_hints", 0UL },
+       { tt_cache_desc_short, 1, "/gpx/wpt/groundspeak:cache/groundspeak:short_description", 0UL },
+       { tt_cache_desc_long, 1, "/gpx/wpt/groundspeak:cache/groundspeak:long_description", 0UL },
+       { tt_cache_log_wpt, 1, "/gpx/wpt/groundspeak:cache/groundspeak:logs/groundspeak:log/groundspeak:log_wpt", 0UL },
+       { tt_cache_log_type, 1, "/gpx/wpt/groundspeak:cache/groundspeak:logs/groundspeak:log/groundspeak:type", 0UL },
+       { tt_cache_log_date, 1, "/gpx/wpt/groundspeak:cache/groundspeak:logs/groundspeak:log/groundspeak:date", 0UL },
+       { tt_cache_placer, 1, "/gpx/wpt/groundspeak:cache/groundspeak:owner", 0UL },
+
+       { tt_rte, 0, "/gpx/rte", 0UL },
+       { tt_rte_name, 0, "/gpx/rte/name", 0UL },
+       { tt_rte_desc, 0, "/gpx/rte/desc", 0UL },
+       { tt_rte_number, 0, "/gpx/rte/number", 0UL },
+       { tt_rte_rtept, 0, "/gpx/rte/rtept", 0UL },
+       { tt_rte_rtept_ele, 0, "/gpx/rte/rtept/ele", 0UL },
+       { tt_rte_rtept_time, 0, "/gpx/rte/rtept/time", 0UL },
+       { tt_rte_rtept_name, 0, "/gpx/rte/rtept/name", 0UL },
+       { tt_rte_rtept_cmt, 0, "/gpx/rte/rtept/cmt", 0UL },
+       { tt_rte_rtept_desc, 0, "/gpx/rte/rtept/desc", 0UL },
+       { tt_rte_rtept_url, 0, "/gpx/rte/rtept/url", 0UL },
+       { tt_rte_rtept_urlname, 0, "/gpx/rte/rtept/urlname", 0UL },
+       { tt_rte_rtept_sym, 0, "/gpx/rte/rtept/sym", 0UL },
+
+       { tt_trk, 0, "/gpx/trk", 0UL },
+       { tt_trk_name, 0, "/gpx/trk/name", 0UL },
+       { tt_trk_desc, 0, "/gpx/trk/desc", 0UL },
+       { tt_trk_trkseg, 0, "/gpx/trk/trkseg", 0UL },
+       { tt_trk_number, 0, "/gpx/trk/number", 0UL },
+       { tt_trk_trkseg_trkpt, 0, "/gpx/trk/trkseg/trkpt", 0UL },
+       { tt_trk_trkseg_trkpt_ele, 0, "/gpx/trk/trkseg/trkpt/ele", 0UL },
+       { tt_trk_trkseg_trkpt_time, 0, "/gpx/trk/trkseg/trkpt/time", 0UL },
+       { tt_trk_trkseg_trkpt_name, 0, "/gpx/trk/trkseg/trkpt/name", 0UL },
+       { tt_trk_trkseg_trkpt_cmt, 0, "/gpx/trk/trkseg/trkpt/cmt", 0UL },
+       { tt_trk_trkseg_trkpt_desc, 0, "/gpx/trk/trkseg/trkpt/desc", 0UL },
+       { tt_trk_trkseg_trkpt_url, 0, "/gpx/trk/trkseg/trkpt/url", 0UL },
+       { tt_trk_trkseg_trkpt_urlname, 0, "/gpx/trk/trkseg/trkpt/urlname", 0UL },
+       { tt_trk_trkseg_trkpt_sym, 0, "/gpx/trk/trkseg/trkpt/sym", 0UL },
+       { tt_trk_trkseg_trkpt_course, 0, "/gpx/trk/trkseg/trkpt/course", 0UL },
+       { tt_trk_trkseg_trkpt_speed, 0, "/gpx/trk/trkseg/trkpt/speed", 0UL },
 
        /* Common to tracks, routes, and waypts */
-       { tt_fix,  0, "/gpx/wpt/fix" },
-       { tt_fix,  0, "/gpx/trk/trkseg/trkpt/fix" },
-       { tt_fix,  0, "/gpx/rte/rtept/fix" },
-       { tt_sat,  0, "/gpx/wpt/sat" },
-       { tt_sat,  0, "/gpx/trk/trkseg/trkpt/sat" },
-       { tt_sat,  0, "/gpx/rte/rtept/sat" },
-       { tt_pdop, 0, "/gpx/wpt/pdop" },
-       { tt_pdop, 0, "/gpx/trk/trkseg/trkpt/pdop" },
-       { tt_pdop, 0, "/gpx/rte/rtept/pdop" },
-       { tt_hdop, 0, "/gpx/wpt/hdop" },
-       { tt_hdop, 0, "/gpx/trk/trkseg/trkpt/hdop" },
-       { tt_hdop, 0, "/gpx/rte/rtept/hdop" },
-       { tt_vdop, 0, "/gpx/wpt/vdop" },
-       { tt_vdop, 0, "/gpx/trk/trkseg/trkpt/vdop" },
-       { tt_vdop, 0, "/gpx/rte/rtept/hdop" },
-       {0}
+       { tt_fix,  0, "/gpx/wpt/fix", 0UL },
+       { tt_fix,  0, "/gpx/trk/trkseg/trkpt/fix", 0UL },
+       { tt_fix,  0, "/gpx/rte/rtept/fix", 0UL },
+       { tt_sat,  0, "/gpx/wpt/sat", 0UL },
+       { tt_sat,  0, "/gpx/trk/trkseg/trkpt/sat", 0UL },
+       { tt_sat,  0, "/gpx/rte/rtept/sat", 0UL },
+       { tt_pdop, 0, "/gpx/wpt/pdop", 0UL },
+       { tt_pdop, 0, "/gpx/trk/trkseg/trkpt/pdop", 0UL },
+       { tt_pdop, 0, "/gpx/rte/rtept/pdop", 0UL },
+       { tt_hdop, 0, "/gpx/wpt/hdop", 0UL },
+       { tt_hdop, 0, "/gpx/trk/trkseg/trkpt/hdop", 0UL },
+       { tt_hdop, 0, "/gpx/rte/rtept/hdop", 0UL },
+       { tt_vdop, 0, "/gpx/wpt/vdop", 0UL },
+       { tt_vdop, 0, "/gpx/trk/trkseg/trkpt/vdop", 0UL },
+       { tt_vdop, 0, "/gpx/rte/rtept/hdop", 0UL },
+       {0, 0, NULL, 0UL}
 };
 
 static tag_type
@@ -1700,15 +1700,15 @@ arglist_t gpx_args[] = {
                "32", ARGTYPE_INT, "1", NULL },
        { "suppresswhite", &suppresswhite, 
                "Suppress whitespace in generated shortnames", 
-               NULL, ARGTYPE_BOOL },
+               NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
        { "logpoint", &opt_logpoint, 
                "Create waypoints from geocache log entries", 
-               NULL, ARGTYPE_BOOL },
+               NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
        { "urlbase", &urlbase, "Base URL for link tag in output", 
-               NULL, ARGTYPE_STRING},
+               NULL, ARGTYPE_STRING, ARG_NOMINMAX},
        { "gpxver", &gpx_wversion, "Target GPX version for output", 
-               "1.0", ARGTYPE_STRING},
-       { 0, 0, 0, 0, 0 }
+               "1.0", ARGTYPE_STRING, ARG_NOMINMAX},
+       ARG_TERMINATOR
 };
 
 ff_vecs_t gpx_vecs = {
index 459c5b863b0a2f54f7c76e9e88e0486a0babad2e..350c9ee6ed3bc6793bc0a5cf08fac18de310c4f6 100644 (file)
@@ -750,7 +750,7 @@ gtm_write(void)
 
 static
 arglist_t gtm_args[] = {
-       { 0, 0, 0, 0, 0 }
+       ARG_TERMINATOR
 };
 
 ff_vecs_t gtm_vecs = {
index c8d5c01a24a49f4402912c498a9e33cf8bfe974d..d8e67c787fa04eeeeb2d3723c54d41d3cdbe5bf1 100644 (file)
@@ -31,7 +31,7 @@ static route_head *trk_head;
 
 static
 arglist_t hiketech_args[] = {
-       {0, 0, 0, 0, 0}
+       ARG_TERMINATOR
 };
 
 /* Waypoints */
index 5b3a6811d86960f5ff30d5ed9bd90d4b74b794f4..973e4538e1c63bee1b698b409f6f98e574302965 100644 (file)
@@ -43,7 +43,7 @@ static FILE *ofd;
 
 static
 arglist_t hsa_ndv_args[] = {
-       {0, 0, 0, 0, 0}
+       ARG_TERMINATOR
 };
 
 #define MYNAME "HsaNdv"
index 437642b07d66cbd22387984f02ace2e4411e750d..b299a74d7e0c66097397568fb380e91a723c2487 100644 (file)
@@ -36,12 +36,12 @@ static char *includelogs = NULL;
 static
 arglist_t html_args[] = {
        { "stylesheet", &stylesheet, 
-               "Path to HTML style sheet", NULL, ARGTYPE_STRING },
+               "Path to HTML style sheet", NULL, ARGTYPE_STRING, ARG_NOMINMAX },
        { "encrypt", &encrypt,
-               "Encrypt hints using ROT13", NULL, ARGTYPE_BOOL },
+               "Encrypt hints using ROT13", NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
        { "logs", &includelogs, 
-               "Include groundspeak logs if present", NULL, ARGTYPE_BOOL },
-       {0, 0, 0, 0, 0}
+               "Include groundspeak logs if present", NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
+       ARG_TERMINATOR
 };
 
 
index 05b3877d861a29da669b3c7ed4d67bc7bd1ccc42..0da923ac1d8f4e6159c636eab35d85b53780443e 100644 (file)
@@ -888,8 +888,8 @@ static void data_write(void)
 static arglist_t igc_args[] = {
     {"timeadj", &timeadj,
      "(integer sec or 'auto') Barograph to GPS time diff", 
-     NULL, ARGTYPE_STRING},
-    {0, 0, 0, 0, 0}
+     NULL, ARGTYPE_STRING, ARG_NOMINMAX},
+    ARG_TERMINATOR
 };
 
 ff_vecs_t igc_vecs = {
index ca03b96dd15c336c1fa9eb742aaa71abdc5f327a..a29ef2c5ff6a0eec315ad9d85118c29fecf68825 100644 (file)
@@ -48,7 +48,7 @@ static char *index_opt = NULL;
 static arglist_t ignr_args[] = 
 {
        {"index", &index_opt, "Index of track to write (if more the one in source)", NULL, ARGTYPE_INT, "1", NULL },
-       {0, 0, 0, 0 }
+       ARG_TERMINATOR
 };
 
 static xg_callback     ignr_start;
index 8e0877a451c0cb452ea618605ba29515c28368cb..798b5af3d5af5fe2a434fa7b7839665b4feefdbc 100644 (file)
@@ -45,7 +45,8 @@ GPS_Make_Packet_usb(GPS_PPacket *packet, UC type, UC *data, int16 n)
 int32
 GPS_Write_Packet_usb(int32 fd, GPS_PPacket packet)
 {
-       garmin_usb_packet gp = {0};
+       garmin_usb_packet gp;
+       memset(&gp, 0, sizeof(gp));
 
 
        /*
index 3f85a3d521a130a723cf517254680892cc1473e2..c8adbed3f3fa6f252859f98482e6c3172ea9dc75 100644 (file)
@@ -51,23 +51,23 @@ static point3d *point3d_list;
 
 static
 arglist_t kml_args[] = {
-       {"deficon", &opt_deficon, "Default icon name", NULL, ARGTYPE_STRING },
+       {"deficon", &opt_deficon, "Default icon name", NULL, ARGTYPE_STRING, ARG_NOMINMAX },
        {"lines", &opt_export_lines, 
          "Export linestrings for tracks and routes",
-         "1", ARGTYPE_BOOL },
+         "1", ARGTYPE_BOOL, ARG_NOMINMAX },
        {"points", &opt_export_points, 
          "Export placemarks for tracks and routes",
-         "1", ARGTYPE_BOOL },
+         "1", ARGTYPE_BOOL, ARG_NOMINMAX },
        {"line_width", &opt_line_width, 
          "Width of lines, in pixels",
-         "6", ARGTYPE_INT },
+         "6", ARGTYPE_INT, ARG_NOMINMAX },
        {"line_color", &opt_line_color, 
          "Line color, specified in hex AABBGGRR",
-         "64eeee17", ARGTYPE_STRING },
+         "64eeee17", ARGTYPE_STRING, ARG_NOMINMAX },
        {"floating", &opt_floating, 
         "Altitudes are absolute and not clamped to ground", 
-        "0", ARGTYPE_BOOL },
-       {0, 0, 0, 0, 0}
+        "0", ARGTYPE_BOOL, ARG_NOMINMAX },
+       ARG_TERMINATOR
 };
 
 #define MYNAME "kml"
index 0e613772d74c64f5cf55e85cb39d072fb609be94..e6f758c58c04b2cd68397eb4cb59eee638bc84ee 100644 (file)
@@ -183,7 +183,7 @@ static char *seg_break;
 #define UNKNOWN_USR_ALTITUDE   -3048  /* -10000ft is how the unit stores unknown */
 
 /* Jan 1, 2000 00:00:00 */
-struct tm base_time = { 0, 0, 0, 1, 0, 100, 5, 1, -1 };
+struct tm base_time = { 0, 0, 0, 1, 0, 100, 5, 1, -1, 0, 0 };
 
 static
 size_t
@@ -260,12 +260,12 @@ lowranceusr_fread(void *buff, size_t size, size_t members, FILE * fp)
 static
 arglist_t lowranceusr_args[] = {
        {"ignoreicons", &ignoreicons, "Ignore event marker icons",
-        NULL, ARGTYPE_BOOL },
+        NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
        {"merge", &merge, "(USR output) Merge into one segmented track",
-       NULL, ARGTYPE_BOOL },
+       NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
        {"break", &seg_break, "(USR input) Break segments into separate tracks",
-       NULL, ARGTYPE_BOOL },
-       {NULL, NULL, NULL, NULL, 0}
+       NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
+       ARG_TERMINATOR
 };
 
 static void
index 5e8a8467a9a3a75e638e7e7319ef4d189141b296..986f9b0ac21d2ebd8d952c4f5a9cb8d50928b094 100644 (file)
@@ -40,7 +40,7 @@ static char *fname_in;
 
 static arglist_t magpdb_args[] = 
 {
-       {0, 0, 0, 0, 0 }
+       ARG_TERMINATOR
 };
 
 static double
index 74638159c1584a71e7db7febf2b0ee6f4617e90b..7f41cf6d3630b3c544ef60339b15d581323ac74a 100644 (file)
@@ -717,23 +717,27 @@ termwrite(char *obuf, int size)
 static
 arglist_t mag_sargs[] = {
        {"baud", &bs, "Numeric value of bitrate (baud=4800)", NULL,
-               ARGTYPE_INT },
+               ARGTYPE_INT, ARG_NOMINMAX },
        {"maxcmts", &cmts, "Max number of comments to write (maxcmts=200)", 
-               NULL, ARGTYPE_INT },
+               NULL, ARGTYPE_INT, ARG_NOMINMAX },
        {"noack", &noack, "Suppress use of handshaking in name of speed",
-               NULL, ARGTYPE_BOOL},
-       {"deficon", &deficon, "Default icon name", NULL, ARGTYPE_STRING },
-       {"nukewpt", &nukewpt, "Delete all waypoints", NULL, ARGTYPE_BOOL },
-       {0, 0, 0, 0, 0}
+               NULL, ARGTYPE_BOOL, ARG_NOMINMAX},
+       {"deficon", &deficon, "Default icon name", NULL, ARGTYPE_STRING,
+               ARG_NOMINMAX },
+       {"nukewpt", &nukewpt, "Delete all waypoints", NULL, ARGTYPE_BOOL,
+               ARG_NOMINMAX },
+       ARG_TERMINATOR
 };
 
 static
 arglist_t mag_fargs[] = {
-       {"deficon", &deficon, "Default icon name", NULL, ARGTYPE_STRING },
+       {"deficon", &deficon, "Default icon name", NULL, ARGTYPE_STRING,
+               ARG_NOMINMAX },
        {"maxcmts", &cmts, "Max number of comments to write (maxcmts=200)", 
-               NULL, ARGTYPE_INT },
-       {"deficon", &deficon, "Default icon name", NULL, ARGTYPE_STRING },
-       {0, 0, 0, 0, 0}
+               NULL, ARGTYPE_INT, ARG_NOMINMAX },
+       {"deficon", &deficon, "Default icon name", NULL, ARGTYPE_STRING,
+               ARG_NOMINMAX },
+       ARG_TERMINATOR
 };
 
 static void
index 0e57d1be8139f43d6851c02e8168263360d7a6ab..4fdf01b12d3d4e91cf6382d32f2a47a8f96398e5 100644 (file)
@@ -77,19 +77,19 @@ static
 arglist_t mps_args[] = {
        {"snlen", &snlen, "Length of generated shortnames", "10", ARGTYPE_INT, "1", NULL },
        { "snwhite", &snwhiteopt, "Allow whitespace synth. shortnames",
-               NULL, ARGTYPE_BOOL},
+               NULL, ARGTYPE_BOOL, ARG_NOMINMAX},
        {"mpsverout", &mpsverout, 
                "Version of mapsource file to generate (3,4,5)", NULL,
-               ARGTYPE_INT },
+               ARGTYPE_INT, ARG_NOMINMAX },
        {"mpsmergeout", &mpsmergeouts, "Merge output with existing file", 
-               NULL, ARGTYPE_BOOL },
+               NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
        {"mpsusedepth", &mpsusedepth, 
                "Use depth values on output (default is ignore)", NULL,
-               ARGTYPE_BOOL },
+               ARGTYPE_BOOL, ARG_NOMINMAX },
        {"mpsuseprox", &mpsuseprox, 
                "Use proximity values on output (default is ignore)", 
-               NULL, ARGTYPE_BOOL },
-       {0, 0, 0, 0, 0}
+               NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
+       ARG_TERMINATOR
 };
 
 /*
index 4cb5f932b42c207c8c7f77cc673d99172a2d8987..f28d3b25523b9ca2258b30ca575ac16fd4be4b66 100644 (file)
@@ -33,7 +33,7 @@ static char *fin_name;
 
 static arglist_t msroute_args[] = 
 {
-       {0, 0, 0, 0, 0 }
+       ARG_TERMINATOR
 };
 
 /* MS-AutoRoute structures */
index 74d8e0e4d7e59a331a40e2966109e81b67c63387..2608a9e271cd1095eb62800d58c06f0ffc9e3198 100644 (file)
@@ -33,8 +33,8 @@ static char *noretired = NULL;
 static
 arglist_t nav_args[] = {
        {"noretired", &noretired, "Suppress retired geocaches",
-               NULL, ARGTYPE_BOOL },
-       {0, 0, 0, 0, 0}
+               NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
+       ARG_TERMINATOR
 };
 
 #define MYNAME "navicache"
index 241428558c0902a78be5963118302a95bd4f9e0e..c83424ab6b2eb1343a55bc16d774652ec9f0cf0e 100644 (file)
@@ -39,15 +39,16 @@ static void fix_netstumbler_dupes(void);
 static
 arglist_t netstumbler_args[] = {
        {"nseicon", &nseicon, "Non-stealth encrypted icon name", 
-               "Red Square", ARGTYPE_STRING },
+               "Red Square", ARGTYPE_STRING, ARG_NOMINMAX },
        {"nsneicon", &nsneicon, "Non-stealth non-encrypted icon name", 
-               "Green Square", ARGTYPE_STRING },
+               "Green Square", ARGTYPE_STRING, ARG_NOMINMAX },
        {"seicon", &seicon, "Stealth encrypted icon name", 
-               "Red Diamond", ARGTYPE_STRING },
+               "Red Diamond", ARGTYPE_STRING, ARG_NOMINMAX },
        {"sneicon", &sneicon, "Stealth non-encrypted icon name", 
-               "Green Diamond", ARGTYPE_STRING },
-       {"snmac", &snmac, "Shortname is MAC address", NULL, ARGTYPE_BOOL },
-       {0, 0, 0, 0, 0}
+               "Green Diamond", ARGTYPE_STRING, ARG_NOMINMAX },
+       {"snmac", &snmac, "Shortname is MAC address", NULL, ARGTYPE_BOOL, 
+               ARG_NOMINMAX },
+       ARG_TERMINATOR
 };
 
 static void
@@ -76,7 +77,9 @@ data_read(void)
        int stealth_num = 0, whitespace_num = 0;
        long flags = 0;
        int speed = 0, channel = 0;
-       struct tm tm = {0};
+       struct tm tm;
+
+       memset(&tm, 0, sizeof(tm));
 
        for(; fgets(ibuf, sizeof(ibuf), file_in);) {
                char *field;
index 8eda30488ace5e7b6dafc542d834fa28aba300ed..c892b175677cf1bb2215e2844c20b2982e41623c 100644 (file)
@@ -165,13 +165,13 @@ static char *snlenopt = NULL;
 static char *optdate = NULL;
 
 arglist_t nmea_args[] = {
-       {"gprmc", &dogprmc, "Write GPRMC sentences", NULL, ARGTYPE_BOOL },
+       {"gprmc", &dogprmc, "Write GPRMC sentences", NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
        {"snlen", &snlenopt, "Max length of waypoint name to write", "6", ARGTYPE_INT, "1", "64" },
-       {"nogpgga", &nogpgga, "Don't write GPGGA sentences", NULL, ARGTYPE_BOOL },
-       {"nogpvtg", &nogpvtg, "Don't write GPVTG sentences", NULL, ARGTYPE_BOOL },
-       {"nogpgsa", &nogpgsa, "Don't write GPGSA sentences", NULL, ARGTYPE_BOOL },
-       {"date", &optdate, "Complete date-free tracks with given date (YYYYMMDD).", NULL, ARGTYPE_INT },
-       {0, 0, 0, 0 }
+       {"nogpgga", &nogpgga, "Don't write GPGGA sentences", NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
+       {"nogpvtg", &nogpvtg, "Don't write GPVTG sentences", NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
+       {"nogpgsa", &nogpgsa, "Don't write GPGSA sentences", NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
+       {"date", &optdate, "Complete date-free tracks with given date (YYYYMMDD).", NULL, ARGTYPE_INT, ARG_NOMINMAX },
+       ARG_TERMINATOR
 };
 
 /*
index 9079533c9803b72351162d997cae2c21e2f2242d..2071e1a06df1cdc8d72d22fd5d3a62a478b06de5 100644 (file)
@@ -45,7 +45,7 @@ static char *index_opt;
 static
 arglist_t nmn4_args[] = {
        {"index", &index_opt, "Index of route to write (if more the one in source)", NULL, ARGTYPE_INT, "1", NULL },
-       {0, 0, 0, 0, 0}
+       ARG_TERMINATOR
 };
 
 
index 42004518b413f62dd7d0b5ed28b1227045dde1b0..ea3b3c83c677d8f2953cf2cf976ff997bc016a97 100644 (file)
@@ -30,12 +30,12 @@ static char *nukewpts, *nuketrks, *nukertes;
 static
 arglist_t nuke_args[] = {
        {"waypoints", &nukewpts, "Remove all waypoints from data stream", 
-          "0", ARGTYPE_BOOL} , 
+          "0", ARGTYPE_BOOL, ARG_NOMINMAX} , 
        {"tracks", &nuketrks, "Remove all tracks from data stream", 
-          "0", ARGTYPE_BOOL} , 
+          "0", ARGTYPE_BOOL, ARG_NOMINMAX} , 
        {"routes", &nukertes, "Remove all routes from data stream", 
-          "0", ARGTYPE_BOOL} , 
-       {0, 0, 0, 0, 0}
+          "0", ARGTYPE_BOOL, ARG_NOMINMAX} , 
+       ARG_TERMINATOR
 };
 
 static void 
index 1c371a4e2dccd5568b1da59a534ee4a8facba305..785919ae499488fddebc8510382693451968b54e 100644 (file)
@@ -82,11 +82,11 @@ static arglist_t ovl_args[] = {
        { "size", &govl_size_s, "size index [101-] for routes",
         NULL, ARGTYPE_INT, "101", NULL },
        { "mapname", &govl_mapname, "name of map",
-        NULL, ARGTYPE_STRING },
+        NULL, ARGTYPE_STRING, ARG_NOMINMAX },
        { "zoomfc", &govl_zoomfc_s, "zoom factor of map in %",
-        NULL, ARGTYPE_INT },
+        NULL, ARGTYPE_INT, ARG_NOMINMAX },
        { "dimmfc", &govl_dimmfc_s, "dimmer factor of map in %",
-        NULL, ARGTYPE_INT },
+        NULL, ARGTYPE_INT, ARG_NOMINMAX },
        { "txtcol", &govl_txtcol_s, "color index [1-9] for waypoint names",
         NULL, ARGTYPE_INT, "1", "9" },
        { "txtsize", &govl_txtsize_s, "text size [101-] for waypoint names",
@@ -94,10 +94,10 @@ static arglist_t ovl_args[] = {
        { "font", &govl_font_s, "font index [1-] for waypoint names",
         NULL, ARGTYPE_INT, "1", NULL },
        { "txttrans", &govl_txttrans_s, "set text background to transparent",
-        NULL, ARGTYPE_BOOL },
+        NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
        { "file", &govl_file_s, "use file of parameters (parameters on command line overwrites file parameters)",
-        NULL, ARGTYPE_STRING },
-       { 0, 0, 0, 0, 0 }
+        NULL, ARGTYPE_STRING, ARG_NOMINMAX },
+       ARG_TERMINATOR
 };
 
 
index 8b8543e12ffb64d7208a879ed214b367f973c6d4..7b6b8d8ce79b7db30da1c21118cd0c597cdff140 100644 (file)
@@ -61,16 +61,16 @@ arglist_t ozi_args[] = {
        {"snlen", &snlenopt, "Max synthesized shortname length",
                "32", ARGTYPE_INT, "1", NULL},
        {"snwhite", &snwhiteopt, "Allow whitespace synth. shortnames",
-               NULL, ARGTYPE_BOOL},
+               NULL, ARGTYPE_BOOL, ARG_NOMINMAX},
        {"snupper", &snupperopt, "UPPERCASE synth. shortnames",
-               NULL, ARGTYPE_BOOL},
+               NULL, ARGTYPE_BOOL, ARG_NOMINMAX},
        {"snunique", &snuniqueopt, "Make synth. shortnames unique",
-               NULL, ARGTYPE_BOOL},
+               NULL, ARGTYPE_BOOL, ARG_NOMINMAX},
        {"wptfgcolor", &wptfgcolor, "Waypoint foreground color",
-               "black", ARGTYPE_STRING},
+               "black", ARGTYPE_STRING, ARG_NOMINMAX},
        {"wptbgcolor", &wptbgcolor, "Waypoint background color",
-               "yellow", ARGTYPE_STRING},
-       {0, 0, 0, 0, 0}
+               "yellow", ARGTYPE_STRING, ARG_NOMINMAX},
+       ARG_TERMINATOR
 };
 
 static gpsdata_type ozi_objective;
index 4d731f06bbc2596e31e00a293a5a357623aa4682..d36d4248aea9dcdf98a8e2fe7e9e7e2badc210dd 100644 (file)
@@ -68,15 +68,15 @@ static
 arglist_t palmdoc_args[] = {
        { "nosep", &suppresssep, 
                "Suppress separator lines between waypoints", NULL,
-               ARGTYPE_BOOL },
-       {"dbname", &dbname, "Database name", NULL, ARGTYPE_STRING },
+               ARGTYPE_BOOL, ARG_NOMINMAX },
+       {"dbname", &dbname, "Database name", NULL, ARGTYPE_STRING, ARG_NOMINMAX },
        {"encrypt", &encrypt, "Encrypt hints with ROT13", NULL,
-               ARGTYPE_BOOL },
+               ARGTYPE_BOOL, ARG_NOMINMAX },
        { "logs", &includelogs,
-               "Include groundspeak logs if present", NULL, ARGTYPE_BOOL },
+               "Include groundspeak logs if present", NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
        { "bookmarks_short", &bmid, "Include short name in bookmarks", 
-               NULL, ARGTYPE_BOOL },
-       {0, 0, 0, 0, 0}
+               NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
+       ARG_TERMINATOR
 };
 
 static struct buffer buf;
index 26b90066516b905f615f2ab047c6802da060f721..c4e0cda204828f3754f4436bab7a5638064f6691 100644 (file)
@@ -63,10 +63,10 @@ static char *snlen_opt = NULL;
 
 static arglist_t ppdb_args[] = 
 {
-       {"dbname", &dbname, "Database name", NULL, ARGTYPE_STRING},
-       {"deficon", &deficon, "Default icon name", NULL, ARGTYPE_STRING},
+       {"dbname", &dbname, "Database name", NULL, ARGTYPE_STRING, ARG_NOMINMAX},
+       {"deficon", &deficon, "Default icon name", NULL, ARGTYPE_STRING, ARG_NOMINMAX},
        {"snlen", &snlen_opt, "Length of generated shortnames", "10", ARGTYPE_INT, "1", NULL },
-       {0, 0, 0, 0, 0 }
+       ARG_TERMINATOR
 };
 
 #undef PPDB_DEBUG
index 02615a7824484ecd7d99e02ca2d52b16b072db7b..0c5c34280df9973121dbaab3ec1207a06077bdce 100644 (file)
@@ -38,11 +38,11 @@ static int route_ctr;
 static
 arglist_t pcx_args[] = {
        {"deficon", &deficon, "Default icon name", "Waypoint", 
-               ARGTYPE_STRING },
+               ARGTYPE_STRING, ARG_NOMINMAX },
        {"cartoexploreur", &cartoexploreur,
                "Write tracks compatible with Carto Exploreur", "",
-               ARGTYPE_BOOL },
-       {0, 0, 0, 0, 0}
+               ARGTYPE_BOOL, ARG_NOMINMAX },
+       ARG_TERMINATOR
 };
 
 static void
index de460907437d9f1f968062ae5afe261be9691e31..6a4a652d992a49b024ef914b978a823af65e7636 100644 (file)
@@ -43,10 +43,10 @@ typedef struct {
 static
 arglist_t polygon_args[] = {
        {"file", &polyfileopt,  "File containing vertices of polygon",
-               NULL, ARGTYPE_FILE | ARGTYPE_REQUIRED },
+               NULL, ARGTYPE_FILE | ARGTYPE_REQUIRED, ARG_NOMINMAX },
        {"exclude", &exclopt, "Exclude points inside the polygon",
-               NULL, ARGTYPE_BOOL },
-       {0, 0, 0, 0, 0}
+               NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
+       ARG_TERMINATOR
 };
 
 static void polytest ( double lat1, double lon1,
index a47954ff78f1a2e47b40422637df8f78728fc868..9fe7c26c3f9322d0aa8badd37895f7c95072a85b 100644 (file)
@@ -48,30 +48,30 @@ typedef struct {
 static
 arglist_t position_args[] = {
        {"distance", &distopt, "Maximum positional distance",
-               NULL, ARGTYPE_FLOAT | ARGTYPE_REQUIRED },
+               NULL, ARGTYPE_FLOAT | ARGTYPE_REQUIRED, ARG_NOMINMAX },
        {"all", &purge_duplicates, 
                "Suppress all points close to other points", 
-               NULL, ARGTYPE_BOOL }, 
-       {0, 0, 0, 0, 0}
+               NULL, ARGTYPE_BOOL, ARG_NOMINMAX }, 
+       ARG_TERMINATOR
 };
 
 static
 arglist_t radius_args[] = {
        {"lat", &latopt,       "Latitude for center point (D.DDDDD)",
-               NULL, ARGTYPE_FLOAT | ARGTYPE_REQUIRED },
+               NULL, ARGTYPE_FLOAT | ARGTYPE_REQUIRED, ARG_NOMINMAX },
        {"lon", &lonopt,       "Longitude for center point (D.DDDDD)",
-               NULL, ARGTYPE_FLOAT | ARGTYPE_REQUIRED },
+               NULL, ARGTYPE_FLOAT | ARGTYPE_REQUIRED, ARG_NOMINMAX },
        {"distance", &distopt, "Maximum distance from center",
-               NULL, ARGTYPE_FLOAT | ARGTYPE_REQUIRED },
+               NULL, ARGTYPE_FLOAT | ARGTYPE_REQUIRED, ARG_NOMINMAX },
        {"exclude", &exclopt,  "Exclude points close to center",
-               NULL, ARGTYPE_BOOL },
+               NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
        {"nosort", &nosort,    "Inhibit sort by distance to center",
-               NULL, ARGTYPE_BOOL },
+               NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
        {"maxcount", &maxctarg,"Output no more than this number of points",
                NULL, ARGTYPE_INT, "1", NULL },
        {"asroute", &routename,"Put resulting waypoints in route of this name",
                NULL, ARGTYPE_STRING, NULL, NULL },
-       {0, 0, 0, 0, 0}
+       ARG_TERMINATOR
 };
 
 static double
index bd0aa8b3cf7710a5cc4a75ec7c85482c69e4c4ac..c626b81c2571022fac2d4f1a0d66fb6471321c02 100755 (executable)
@@ -58,7 +58,7 @@ static
 arglist_t psit_args[] = {
 /*     {"snlen", &snlen, "Length of generated shortnames", 
        NULL, ARGTYPE_INT, "1", NULL }, */
-       {0, 0, 0, 0, 0}
+       ARG_TERMINATOR
 };
 
 /* Taken from PsiTrex 1.13 */
index 58b7e3b903d90b2b681b7f6faf19cef31954e716..51d7043c5d21e0a8e7f2b317bb644d289e8c37f6 100644 (file)
@@ -35,8 +35,8 @@ static char *dbname = NULL;
 
 static
 arglist_t quovadis_args[] = {
-       {"dbname", &dbname, "Database name", NULL, ARGTYPE_STRING},
-       {0, 0, 0, 0, 0}
+       {"dbname", &dbname, "Database name", NULL, ARGTYPE_STRING, ARG_NOMINMAX},
+       ARG_TERMINATOR
 };
 
 static struct qv_icon_mapping mapping[] = {
index 82b9848eb8808bcc7ecc86dd109ab18ee7cd8c6a..6bc204f2ea2df0b5d435bb0f7f8a79fc98bea142 100644 (file)
@@ -25,7 +25,7 @@
 
 static
 arglist_t reverse_route_args[] = {
-       {0, 0, 0, 0, 0}
+       ARG_TERMINATOR
 };
 
 void 
index a434ed05fe9bf01c9cf18497c08f348ff0881042..239b08a34f4f7d6a27e53da2528171b5f83402f6 100644 (file)
@@ -39,14 +39,14 @@ static
 arglist_t saroute_args[] = {
        {"turns_important", &turns_important, 
                "Keep turns if simplify filter is used", 
-               NULL, ARGTYPE_BOOL },
+               NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
        {"turns_only", &turns_only, "Only read turns; skip all other points",
-               NULL, ARGTYPE_BOOL },
+               NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
        {"split", &split, "Split into multiple routes at turns",
-                       NULL, ARGTYPE_BOOL },
+                       NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
        {"controls", &controls, "Read control points as waypoint/route/none",
-               "none", ARGTYPE_STRING },
-       {0, 0, 0, 0 }
+               "none", ARGTYPE_STRING, ARG_NOMINMAX },
+       ARG_TERMINATOR
 };
 
 unsigned short
index 607f62ed5f8468ea7de114b9516adc67a2547414..c999cf0142eceb5bf45cd43480c750e94507ea5b 100644 (file)
@@ -40,7 +40,7 @@ static
 arglist_t shp_args[] = {
        {"name", &opt_name, "Index of name field in .dbf",
                NULL, ARGTYPE_INT, "0", NULL },
-       { 0, 0, 0, 0}
+       ARG_TERMINATOR
 };
 
 static void
index bd23024f791775da641bedc87cb53754dc108be3..9bf0facfbf778fa05870455813b0d90ce087d653 100644 (file)
@@ -73,10 +73,10 @@ arglist_t routesimple_args[] = {
        {"error", &erroropt, "Maximum error", NULL,
                ARGTYPE_STRING | ARGTYPE_END_REQ | ARGTYPE_END_EXCL, "0", NULL},
        {"crosstrack", &xteopt, "Use cross-track error (default)", NULL, 
-               ARGTYPE_BOOL | ARGTYPE_BEGIN_EXCL, NULL, NULL },
+               ARGTYPE_BOOL | ARGTYPE_BEGIN_EXCL, ARG_NOMINMAX },
        {"length", &lenopt, "Use arclength error", NULL, 
-               ARGTYPE_BOOL | ARGTYPE_END_EXCL, NULL, NULL },
-       {0, 0, 0, 0, 0}
+               ARGTYPE_BOOL | ARGTYPE_END_EXCL, ARG_NOMINMAX },
+       ARG_TERMINATOR
 };
 
 struct xte_intermed;
index 29c665929b987240cde4107fb9b626afe4639a9f..790faa29985410b0d7c6d472e9e79da27283fe05 100644 (file)
@@ -36,14 +36,14 @@ static char *opt_sm_gcid, *opt_sm_shortname, *opt_sm_description, *opt_sm_time;
 static
 arglist_t sort_args[] = {
        {"gcid", &opt_sm_gcid, "Sort by numeric geocache ID", 
-               NULL, ARGTYPE_BOOL },
+               NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
        {"shortname", &opt_sm_shortname, "Sort by waypoint short name", 
-               NULL, ARGTYPE_BOOL },
+               NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
        {"description", &opt_sm_description, "Sort by waypoint description", 
-               NULL, ARGTYPE_BOOL },
+               NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
        {"time", &opt_sm_time, "Sort by time", 
-               NULL, ARGTYPE_BOOL },
-       {0, 0, 0, 0, 0}
+               NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
+       ARG_TERMINATOR
 };
 
 static int
index 6f973292f125d96de846dc25e000e1d2b97aea3c..cc4779284fab75f4ed6e7b65ccd1608d74b5254b 100644 (file)
@@ -39,24 +39,24 @@ static int  swapdepth = 0;
 static
 arglist_t stackfilt_args[] = {
        {"push", &opt_push, "Push waypoint list onto stack", NULL, 
-               ARGTYPE_BEGIN_EXCL | ARGTYPE_BEGIN_REQ | ARGTYPE_BOOL},
+               ARGTYPE_BEGIN_EXCL | ARGTYPE_BEGIN_REQ | ARGTYPE_BOOL, ARG_NOMINMAX},
        {"pop", &opt_pop, "Pop waypoint list from stack", NULL,
-               ARGTYPE_BOOL},
+               ARGTYPE_BOOL, ARG_NOMINMAX},
        {"swap", &opt_swap, "Swap waypoint list with <depth> item on stack", 
-               NULL, ARGTYPE_END_EXCL | ARGTYPE_END_REQ | ARGTYPE_BOOL},
+               NULL, ARGTYPE_END_EXCL | ARGTYPE_END_REQ | ARGTYPE_BOOL, ARG_NOMINMAX},
        {"copy", &opt_copy, "(push) Copy waypoint list", NULL,
-               ARGTYPE_BOOL},
+               ARGTYPE_BOOL, ARG_NOMINMAX},
        {"append", &opt_append, "(pop) Append list", NULL,
-               ARGTYPE_BEGIN_EXCL | ARGTYPE_BOOL},
+               ARGTYPE_BEGIN_EXCL | ARGTYPE_BOOL, ARG_NOMINMAX},
        {"discard", &opt_discard, "(pop) Discard top of stack", 
-               NULL, ARGTYPE_BOOL},
+               NULL, ARGTYPE_BOOL, ARG_NOMINMAX},
        {"replace", &opt_replace, "(pop) Replace list (default)", 
-               NULL, ARGTYPE_END_EXCL | ARGTYPE_BOOL},
+               NULL, ARGTYPE_END_EXCL | ARGTYPE_BOOL, ARG_NOMINMAX},
        {"depth", &opt_depth, "(swap) Item to use (default=1)", 
                NULL, ARGTYPE_INT, "0", NULL},
        {"nowarn", &nowarn, "Suppress cleanup warning", NULL, 
-               ARGTYPE_BOOL | ARGTYPE_HIDDEN},
-       {0, 0, 0, 0, 0}
+               ARGTYPE_BOOL | ARGTYPE_HIDDEN, ARG_NOMINMAX},
+       ARG_TERMINATOR
 };
 
 struct stack_elt {
index e3a64e6c42ad9daf4eaee3646f558aede5a362ce..e927f7acb53671cb1fb79193dd5cf229ff10fd6b 100644 (file)
@@ -48,7 +48,7 @@ arglist_t stmwpp_args[] =
 {
        {"index", &index_opt, "Index of route/track to write (if more the one in source)", 
                NULL, ARGTYPE_INT, "1", NULL },
-       {0, 0, 0, 0, 0}
+       ARG_TERMINATOR
 };
 
 
index 8cdd55f3de4c3e0c5334a9582d007dde162f8b99..bcfa4054c5ef10f4b9ec1902e55128b70f841958 100644 (file)
@@ -36,8 +36,8 @@ static char *routevia = NULL;
 
 static arglist_t tef_xml_args[] = 
 {
-       {"routevia", &routevia, "Include only via stations in route", NULL, ARGTYPE_BOOL},
-       {0, 0, 0, 0 }
+       {"routevia", &routevia, "Include only via stations in route", NULL, ARGTYPE_BOOL, ARG_NOMINMAX},
+       ARG_TERMINATOR
 };
 
 #define MYNAME "TourExchangeFormat"
index afd4ec68a278daf36fdba6de5aae60d68e22e408..70297d51437ee76409889647af5a4f72f1591c52 100644 (file)
@@ -37,12 +37,12 @@ static
 arglist_t text_args[] = {
        { "nosep", &suppresssep, 
                "Suppress separator lines between waypoints", 
-               NULL, ARGTYPE_BOOL },
+               NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
        { "encrypt", &encrypt,
-               "Encrypt hints using ROT13", NULL, ARGTYPE_BOOL },
+               "Encrypt hints using ROT13", NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
        { "logs", &includelogs,
-                "Include groundspeak logs if present", NULL, ARGTYPE_BOOL },
-       {0, 0, 0, 0, 0}
+                "Include groundspeak logs if present", NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
+       ARG_TERMINATOR
 };
 
 
index 9348d19ac792fa385bbc256cfc996754e594ddb0..fb357542219cb835fe5d0efd7533ed975ea6e2c6 100644 (file)
@@ -63,37 +63,37 @@ static char *clickmap = NULL;
 static
 arglist_t tiger_args[] = {
        {"nolabels", &nolabels, "Suppress labels on generated pins",
-               NULL, ARGTYPE_BOOL },
+               NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
        {"genurl", &genurl, "Generate file with lat/lon for centering map",
-               NULL, ARGTYPE_OUTFILE },
+               NULL, ARGTYPE_OUTFILE, ARG_NOMINMAX },
        {"margin", &margin, "Margin for map.  Degrees or percentage",
-               "15%", ARGTYPE_FLOAT},
+               "15%", ARGTYPE_FLOAT, ARG_NOMINMAX},
        {"snlen", &snlen, "Max shortname length when used with -s",
                "10", ARGTYPE_INT, "1", NULL},
        {"oldthresh", &oldthresh, 
                "Days after which points are considered old",
-               "14", ARGTYPE_INT},
+               "14", ARGTYPE_INT, ARG_NOMINMAX},
        {"oldmarker", &oldmarker, "Marker type for old points",
-               "redpin", ARGTYPE_STRING},
+               "redpin", ARGTYPE_STRING, ARG_NOMINMAX},
        {"newmarker", &newmarker, "Marker type for new points",
-               "greenpin", ARGTYPE_STRING},
+               "greenpin", ARGTYPE_STRING, ARG_NOMINMAX},
        {"suppresswhite", &suppresswhite,
                "Suppress whitespace in generated shortnames", 
-               NULL, ARGTYPE_BOOL },
+               NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
        {"unfoundmarker", &unfoundmarker, "Marker type for unfound points",
-               "bluepin", ARGTYPE_STRING},
+               "bluepin", ARGTYPE_STRING, ARG_NOMINMAX},
        {"xpixels", &xpixels, "Width in pixels of map",
-               "768", ARGTYPE_INT},
+               "768", ARGTYPE_INT, ARG_NOMINMAX},
        {"ypixels", &ypixels, "Height in pixels of map",
-               "768", ARGTYPE_INT},
+               "768", ARGTYPE_INT, ARG_NOMINMAX},
        {"iconismarker", &iconismarker,
                "The icon description is already the marker", NULL,
-               ARGTYPE_BOOL },
+               ARGTYPE_BOOL, ARG_NOMINMAX },
 #if CLICKMAP
        {"clickmap", &clickmap, "Generate Clickable map web page",
-               NULL, ARGTYPE_BOOL},
+               NULL, ARGTYPE_BOOL, ARG_NOMINMAX},
 #endif
-       {0, 0, 0, 0, 0}
+       ARG_TERMINATOR
 };
 
 
index c81295676a1b59b8f34e5d72be3d1bec6c0ad1f4..97dcb81f0de503c46270049fc301a39ef94eff1a 100644 (file)
@@ -41,7 +41,7 @@ static FILE *file_out;
 
 static
 arglist_t tomtom_args[] = {
-       {0, 0, 0, 0 }
+       ARG_TERMINATOR
 };
 
 static void
index fd7b2c906b61958c9236ff14ae88d904d657b42c..442f9a3f453f463ec0f2e4a694472111594e1251 100644 (file)
@@ -40,8 +40,8 @@ static unsigned int waypt_out_count;
 
 static
 arglist_t tpg_args[] = {
-       {"datum", &tpg_datum_opt, "Datum (default=NAD27)", "N. America 1927 mean", ARGTYPE_STRING },
-       {0, 0, 0, 0, 0}
+       {"datum", &tpg_datum_opt, "Datum (default=NAD27)", "N. America 1927 mean", ARGTYPE_STRING, ARG_NOMINMAX },
+       ARG_TERMINATOR
 };
 
 static int
index 3fbb4cd200f2c31e8e5317bcbe0300e008f0c0cf..6e47b504a8661d9769561fb9ce76b0c2ab62a3f6 100644 (file)
@@ -41,10 +41,10 @@ static char *output_state = NULL;
 static
 arglist_t tpo_args[] = {
        { "dumpheader", &dumpheader, "Display the file header bytes", 
-               "0", ARGTYPE_BOOL} , 
+               "0", ARGTYPE_BOOL, ARG_NOMINMAX} , 
        { "state", &output_state, "State map format to write, default=CA", 
-         "CA", ARGTYPE_STRING} , 
-       {0, 0, 0, 0, 0}
+         "CA", ARGTYPE_STRING, ARG_NOMINMAX} , 
+       ARG_TERMINATOR
 };
 
 static FILE *tpo_file_in;
index 7a5a892af957bdcd9ac024fa6e20808719549da6..2e2cacc6e6cb64f0508a9c2ec44fce534f1061e2 100644 (file)
@@ -59,20 +59,20 @@ static char *opt_stop = NULL;
 static
 arglist_t trackfilter_args[] = {
        {TRACKFILTER_MOVE_OPTION, &opt_move, 
-           "Correct trackpoint timestamps by a delta", NULL, ARGTYPE_STRING},
+           "Correct trackpoint timestamps by a delta", NULL, ARGTYPE_STRING, ARG_NOMINMAX},
        {TRACKFILTER_PACK_OPTION,  &opt_pack,  
-           "Pack all tracks into one", NULL, ARGTYPE_BOOL},
+           "Pack all tracks into one", NULL, ARGTYPE_BOOL, ARG_NOMINMAX},
        {TRACKFILTER_SPLIT_OPTION, &opt_split, 
-           "Split track by date or by time interval (see README)", NULL, ARGTYPE_STRING},
+           "Split track by date or by time interval (see README)", NULL, ARGTYPE_STRING, ARG_NOMINMAX},
        {TRACKFILTER_MERGE_OPTION, &opt_merge, 
-           "Merge multiple tracks for the same way", NULL, ARGTYPE_STRING},
+           "Merge multiple tracks for the same way", NULL, ARGTYPE_STRING, ARG_NOMINMAX},
        {TRACKFILTER_START_OPTION, &opt_start, 
-           "Use only track points after this timestamp", NULL, ARGTYPE_INT},
+           "Use only track points after this timestamp", NULL, ARGTYPE_INT, ARG_NOMINMAX},
        {TRACKFILTER_STOP_OPTION, &opt_stop, 
-           "Use only track points before this timestamp", NULL, ARGTYPE_INT},
+           "Use only track points before this timestamp", NULL, ARGTYPE_INT, ARG_NOMINMAX},
        {TRACKFILTER_TITLE_OPTION, &opt_title, 
-           "Basic title for new track(s)", NULL, ARGTYPE_STRING},
-       {0, 0, 0, 0, 0}
+           "Basic title for new track(s)", NULL, ARGTYPE_STRING, ARG_NOMINMAX},
+       ARG_TERMINATOR
 };
 
 
index d72a844b2f14cabad0e724e1135368d0b25c54cd..26bbd0b1750c8059d0b819839c66b3d4e9f04630 100644 (file)
@@ -44,7 +44,7 @@ static char *unicsv_fieldsep;
 
 static
 arglist_t unicsv_args[] = {
-       {0, 0, 0, 0, 0}
+       ARG_TERMINATOR
 };
 
 /* helpers */
index 51eb773d07869eb574f122fcab1832adb63c4969..14a75d4a424a21d9ef98d3946887fac2b051872d 100644 (file)
@@ -33,8 +33,8 @@ static char *encrypt = NULL;
 static
 arglist_t vcf_args[] = {
        { "encrypt", &encrypt,
-               "Encrypt hints using ROT13", NULL, ARGTYPE_BOOL },
-       {0, 0, 0, 0, 0}
+               "Encrypt hints using ROT13", NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
+       ARG_TERMINATOR
 };
 
 static void
index 18fe4c2a6e315956999e81ebc6cddf6aecd1f3d5..e3de4500e0a19e5042967bf65e02a3bb1c059781 100644 (file)
@@ -108,7 +108,7 @@ vitosmt_read(void)
        double                  lonrad                  =0;
        double                  elev                    =0;
        unsigned char*  timestamp               =0;
-       struct tm               tmStruct                ={0,0,0,0,0,0,0,0,0};
+       struct tm               tmStruct;
        double                  seconds                 =0.0;
        double                  speed                   =0.0;
        double                  course                  =0.0;
@@ -118,7 +118,8 @@ vitosmt_read(void)
        unsigned char   gpssats                 =0;
        int                             serial                  =0;
 
-               
+       
+       memset(&tmStruct, 0, sizeof(tmStruct));
        /* 
         * 24 bytes header 
         */
index 5f45170cbfe7c03a40e4d14457304c6723dcae6b..321299eacabfacfe1f877eb0e102a2110267ea6a 100644 (file)
@@ -43,21 +43,21 @@ static const char *intstylebuf = NULL;
 static
 arglist_t xcsv_args[] = {
        {"style", &styleopt, "Full path to XCSV style file", NULL,
-               ARGTYPE_FILE | ARGTYPE_REQUIRED },
+               ARGTYPE_FILE | ARGTYPE_REQUIRED, ARG_NOMINMAX },
        {"snlen", &snlenopt, "Max synthesized shortname length", NULL,
                ARGTYPE_INT, "1", NULL},
        {"snwhite", &snwhiteopt, "Allow whitespace synth. shortnames",
-               NULL, ARGTYPE_BOOL},
+               NULL, ARGTYPE_BOOL, ARG_NOMINMAX},
        {"snupper", &snupperopt, "UPPERCASE synth. shortnames",
-               NULL, ARGTYPE_BOOL},
+               NULL, ARGTYPE_BOOL, ARG_NOMINMAX},
        {"snunique", &snuniqueopt, "Make synth. shortnames unique",
-               NULL, ARGTYPE_BOOL},
+               NULL, ARGTYPE_BOOL, ARG_NOMINMAX},
        {"urlbase", &xcsv_urlbase, "Basename prepended to URL on output",
-               NULL, ARGTYPE_STRING},
+               NULL, ARGTYPE_STRING, ARG_NOMINMAX},
        {"prefer_shortnames", &prefer_shortnames, 
                "Use shortname instead of description", 
-               NULL, ARGTYPE_BOOL },
-       {0, 0, 0, 0, 0}
+               NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
+       ARG_TERMINATOR
 };
 
 /* a table of config file constants mapped to chars */
index 015f2572c312572e2c2e1b137f99c9fe0fca55da..367f5c00d12cc84599d4f47f29f671da6b766c7a 100644 (file)
@@ -31,8 +31,8 @@ static
 arglist_t yahoo_args[] = {
        {"addrsep", &as, 
        "String to separate concatenated address fields (default=\", \")", 
-       ", ", ARGTYPE_STRING },
-       {0, 0, 0, 0, 0}
+       ", ", ARGTYPE_STRING, ARG_NOMINMAX },
+       ARG_TERMINATOR
 };
 
 static xg_callback     wpt_s, wpt_lat, wpt_lon, wpt_e;